package com.whyx.project.openapi.business;

import com.alibaba.fastjson.JSONObject;

import java.text.SimpleDateFormat;
import java.util.Date;

public class PolygonAreaInfo extends AddPolygonArea{
    //标识Id
    public int signId;

    //区域属性:1：装货区域，2：禁区，3：倾倒区域 4：限速圈 5：停车场
    //例如：001=1 装货区，010=2 禁区，011=3 倾倒区
    public int areaProperty;

    //起始时间
    public Date startTime;

    //结束时间
    public Date endTime;

    //业务值
    public int businessValue;

    //点数
    public int point;

    //经度
    public double Lng;

    //纬度
    public double Lat;

    public JSONObject toJSONString() {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        JSONObject object = new JSONObject();
        object.put("flag",flag);
        object.put("count",count);
        object.put("signId",signId);
        object.put("areaProperty",areaProperty);
        object.put("startTime",sdf.format(startTime));
        object.put("endTime",sdf.format(endTime));
        object.put("businessValue",businessValue);
        object.put("point",point);
        object.put("Lng",Lng);
        object.put("Lat",Lat);
        object.put("distributeMsgTopic",distributeMsgTopic);
        object.put("msgId",msgId);
        object.put("devNo",devNo);
        object.put("requestId",requestId);
        object.put("userId",userId);
        object.put("userName",userName);
        object.put("distributeTime",sdf.format(distributeTime));
        object.put("serialNo",serialNo);
        return object;
    }
}
